package com.code9xs.service;

import com.code9xs.pojo.Article;
import com.code9xs.pojo.LikeAndFavorites;
import com.code9xs.util.PageUtil;
import com.code9xs.util.Result;

import java.util.List;
import java.util.Map;

/**
 * @author Suhd
 * @date 2021/5/12
 * @time 10:10
 * @wechat i9xswanan
 * @github https://github.com/Code9xs
 */
public interface ArticleService {
    boolean publishArticle(Article article);

    PageUtil getAllArticlePagination(Integer page,Integer pageSize);

    Map<String,Object> getUserInfoBar();

    Result getArticleCommentByArticleId(Integer articleId);

    boolean clickLike(Integer articleId);

    boolean dislike(Integer articleId);

    LikeAndFavorites getUserIsLikeOrFavorites(Integer articleId);

    boolean clickFavorites(Integer articleId);

    boolean cancelFavorite(Integer articleId);

    boolean addViews(Integer articleId);

    Map<String,Object> getArticleItem(Integer articleId);

    boolean publishComment(Integer articleId,String content);

    boolean publishUserComment(Integer articleId,Integer replyUserId,String content);

    PageUtil getCurrentUserArticle(Integer page,Integer pageSize);

    boolean updateArticle(Integer articleId,String content,String title);

    boolean updateSaveUserArticle(Integer articleId, String content, String title);

    boolean deleteArticle(Integer articleId);

    List<Map<String,Object>> getMaxArticle();
}
